<?php
/**
 * Created by PhpStorm.
 * User: fuguang
 * Date: 2018/1/12
 * Time: 上午11:50
 */
use yii\helpers\Html;
use yii\bootstrap\Modal;
use common\helpers\StringHelper;
?>

<li data-id="<?= $item['id'];?>" data-title="<?= $item['title'];?>" id="<?= $item['id'];?>">
    <div style="height: 65px;overflow-y: hidden;padding-top: 5px;">
        <div style="width: 10%;float: left;">
            <div style="max-width: 100px;overflow: hidden;margin-right: 10px;">
                <img src="<?= $item['image'];?>" >
            </div>
        </div>
        <div style="float: left;line-height: 12px;font-size: 12px;width: 35%;margin-left: 10px;">
            <div><?= $item['title'];?></div>
        </div>
        <div style="float: left;line-height: 12px;width: 20%;margin-left: 10px;text-align: center;"><?= $item['ptime'];?></div>
        <div style="float: left;line-height: 12px;width: 10%;margin-left: 10px;text-align: center;">
            <?php
            if($item['status'] == 0){
                echo '发布中';
            }elseif($item['status'] == 1){
                echo '已删除';
            }elseif($item['status'] == 2){
                echo '草稿';
            }
            ?>
        </div>
        <div style="float: left;line-height: 12px;width: 10%;margin-left: 10px;text-align: center;"><?= $item['position'];?></div>
        <div style="width: 10%;float: left;">
            <?= Html::button('删除', ['class' => 'btn btn-sm btn-default text-center remove','data-id' => $item['id']]) ?>
            <?= Html::a('编辑', ['update-banner?id='.$item['id']], ['class' => 'btn btn-sm btn-default']) ?>
        </div>
        <div class="clearfix"></div>
    </div>
</li>
